﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TomShane.Neoforce.Controls;
using Microsoft.Xna.Framework.Graphics;

namespace XGame.Class
{
    class BottomMenu : ImageBox
    {
        const int x = 10;

        public ImageButton RoleAttributeButton;
        public ImageButton ParcelBodyButton;
        public ToolCell[] Cells;
        public BottomMenu(Manager Manager)
            : base(Manager)
        {
            Cells = new ToolCell[x];
        }

        public override void Init()
        {
            base.Init();
            this.Image = Manager.Content.Load<Texture2D>(@"Content\Image\Interface\Plate\BottomMenu");
            this.Width = 732;
            this.Height = 60;

            for (int i = 0; i < x; i++)
            {
                Cells[i] = new ToolCell(Manager, "", ToolIcon.Type.Skill);
                Cells[i].Init();
                Cells[i].Width = 32;
                Cells[i].Height = 32;
                Cells[i].Left = 50 + i * 34;
                Cells[i].Top = 28;
                Cells[i].Parent = this;
            }

            RoleAttributeButton = new ImageButton(Manager);
            RoleAttributeButton.Init();
            RoleAttributeButton.Image = Manager.Content.Load<Texture2D>(@"Content\Image\Icon\14");
            RoleAttributeButton.PressImage = Manager.Content.Load<Texture2D>(@"Content\Image\Icon\13");
            RoleAttributeButton.Width = 18;
            RoleAttributeButton.Height = 26;
            RoleAttributeButton.Left = 481;
            RoleAttributeButton.Top = 30;
            RoleAttributeButton.Mode = ButtonMode.PushButton;
            RoleAttributeButton.CanFocus = false;
            RoleAttributeButton.Parent = this;

            ParcelBodyButton = new ImageButton(Manager);
            ParcelBodyButton.Init();
            ParcelBodyButton.Image = Manager.Content.Load<Texture2D>(@"Content\Image\Icon\16");
            ParcelBodyButton.PressImage = Manager.Content.Load<Texture2D>(@"Content\Image\Icon\15");
            ParcelBodyButton.Width = 18;
            ParcelBodyButton.Height = 26;
            ParcelBodyButton.Left = 504;
            ParcelBodyButton.Top = 30;
            ParcelBodyButton.Mode = ButtonMode.PushButton;
            ParcelBodyButton.CanFocus = false;
            ParcelBodyButton.Parent = this;


        }
    }
}
